package cn.cn77.futures;

import org.json.JSONException;
import org.json.JSONObject;

import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;
import cn.cn77.futures.utils.C2Sever;
import cn.cn77.futures.widget.NavigationBar;

public class IntroductionActivity extends BaseActivity {
	private NavigationBar naviBar;
	private TextView introTv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.intro_activity);
		naviBar = (NavigationBar) findViewById(R.id.intro_navi_bar);
		naviBar.setTitle("使用说明");
		introTv = (TextView) findViewById(R.id.tv_introduction);
		setUrl(C2Sever.Controller.Introduction, C2Sever.Action.Introduction);
		doAsyncPost(this);
	}

	@Override
	protected void successWithData(JSONObject data, int status) {
		try {
			introTv.setText(Html.fromHtml(data.getString(C2Sever.Field.Other)));
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

}
